package greetings

// 单个传入
func HelloError(name string) (string, error) {
	// Return a greeting that embeds the name in a message.

	return name, nil
}

// 传入多个名称返回一个字典
func HellosError(names []string) (map[string]string, error) {
	result := make(map[string]string)

	for _, name := range names {
		msg, err := HelloError(name)
		if err != nil {
			return nil, err
		}

		result[name] = msg
	}

	return result, nil
}
